﻿Imports System.Data
Imports System.Data.SqlClient
Imports Datos
Imports Entidad

Public Class NotaCreditoNegocio

    Dim dao As New NotaCreditoDatos

    Function obtenerNotasCreditoDBF() As DataSet
        Return dao.obtenerNotasCreditoDBF()
    End Function

    Sub registrarNotaCredito(ByVal nc As NotaCredito)
        dao.registrarNotaCredito(nc)
    End Sub

    Function obtenerDocumento(ByVal codDoc As String, ByVal codCIA As String, ByVal codSUC As String, ByVal codTip As String) As NotaCredito
        Return dao.obtenerDocumento(codDoc, codCIA, codSUC, codTip)
    End Function

    Function verificarRelacion(ByVal codDocumento As String) As Boolean
        Return dao.verificarRelacion(codDocumento)
    End Function

    Function verificarMotivoAnulacion(ByVal codMot As String) As String
        Return dao.verificarMotivoAnulacion(codMot)
    End Function

    Function obtenerCodigoAnulacion(ByVal codDoc As String) As String
        Return dao.obtenerCodigoAnulacion(codDoc)
    End Function

    Sub actualizaFechaSincronizacion()
        dao.actualizaFechaSincronizacion()
    End Sub

    Sub anularNotaCredito(ByVal tdoc As String, ByVal codDoc As String)
        dao.anularNotaCredito(tdoc, codDoc)
    End Sub

End Class
